package Day13.IO;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class IODemo1 {
    //构造方法
    public static void main(String[] args) throws IOException {
        //创建字节输出流对象，关联文件
        FileOutputStream fileOutputStream = new FileOutputStream("D:\\A.txt",true);//true开启追加写入模式
        //写出数据
        byte[] bys = {97,98,99};

        fileOutputStream.write(97);
        fileOutputStream.write(98);
        fileOutputStream.write(99);
        fileOutputStream.write(bys);
        fileOutputStream.write("你好你好".getBytes());

    }
}
